<template>
  <div id="course-item">
    <div class="course-pic"><img src="~assets/images/allcourse.png" alt=""></div>
    <div class="course-content">
      <div class="course-title">{{courseTitle}}</div>
      <div class="course-num">课程数量&nbsp;&nbsp;&nbsp;{{num}}</div>
      </div>
  </div>
</template>

<script lang="ts">
import { Component , Vue } from 'vue-property-decorator'

@Component({
  name:'CourseItem',
  components:{}
})
export default class CourseItem extends Vue{
  courseTitle:string='全部课程';
  num:Number=1;
}
</script>

<style lang="less" scoped>
#course-item{
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 21rem;
  // height: 22rem;
  margin-bottom: 0.5rem;
  text-align: center;
  border-radius: 0.5rem;
  overflow: hidden;
  .course-pic{
    width: 100%;
    img{
      width: 100%;
      vertical-align: middle;
    }
  }
  .course-content{
    height: 8rem;
    background-color: #fff;
    .course-title{
      margin-top: 1.5rem;
      color:#101010;
      font-size: 20px;
      font-weight: 700;
    }
    .course-num{
      margin-top: 1rem;
      font-size: 15px;
      color: #aaa;
    }
  }
}
</style>